<%-- 
    Document   : mostrarHilo
    Created on : 04/12/2008, 10:41:11 AM
    Author     : Administrador
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<%
        if (session.getAttribute("user") == null || session.getAttribute("hilo_id_") == null || session.getAttribute("curs_id_") == null)
        {
            String error;
            if (session.getAttribute("user") == null )
                error = "usuario nulo";
            else
                if (session.getAttribute("hilo_id_") == null)
                    error = "Hilo no valido";
                else
                    //if (session.getAttribute("curs_id_") == null)
                        error = "Curso nulo";

            session.setAttribute("error", error);
            response.sendRedirect("error.jsp");
            return;
        }
%>

<html>
    <head>
        <jsp:include page="cabecera.jsp" />
        <script language="JavaScript" type="text/javascript" src="js/richedit.js"></script>
            <script type="text/javascript" src="js/AJS.js"></script>
            <script type="text/javascript" src="js/googiespell.js"></script>
            <script type="text/javascript" src="js/cookiesupport.js"></script>
            <link href="js/googiespell.css" rel="stylesheet" type="text/css" media="all" />
    <!--style type="text/css">
        .textarea {
            /*    START GoogieSpell reqs.*/
            line-height: 13px;
            font-size: 13px;
            padding: 2px;
            font-family: sans-serif;
            /*    END GoogieSpell reqs.*/

            width: 600px;
            height: 335px;
        }
    </style-->
 
    
    </head>
    <body>
        <div id="main">
            <div id="content">
                <div id="text">
                    <br>
                    <br>
                    <h2><strong>[Hilo::.] <%= session.getAttribute("hilo_tema_")%></strong></h2>



                    <%
        //Vector v1 = (Vector)vr.get(0);
/*
        String dato = (String)v1.get(0);
        int xcant = Integer.parseInt(dato); */
        Vector comentarios = (Vector) session.getAttribute("listaComentarios");
        int i;

        for (i = 0; i < comentarios.size(); i++) {
            Vector v1 = (Vector) comentarios.get(i);

            String dato1 = (String) v1.get(0);//com_id
            String dato2 = (String) v1.get(1);//hilo_id
            String dato3 = (String) v1.get(2);//curso_id
            String dato4 = (String) v1.get(3);//com_texto
            String dato5 = (String) v1.get(4);//com_fecha
            String dato6 = (String) v1.get(5);//user_id
                    %>

                    <div id="footer">
                        <!--div id="left_footer">&copy; Copyright 2008<strong> Colorus </strong>design </div-->
                        <div id="right_footer">
                            <%=dato5%><br>
                            <strong>.:: El usuario <%= dato6/*Usuario*/%> dijo:</strong> <br><br>
                                <p><%= dato4/*comentario*/%></p>
                            <!--div style="text-align:justify">
                                
                            </div-->
                        </div>
                    </div>

                    <%
        }
                    %>
                    <div id="footer">
                        <div id="right_footer">

                            <form name="addComment" method="post" action="agregarComentario.jsp" onsubmit="syncTextarea();">
                                <textarea  name="var_come_texto" id="agregarComentario"  rows="3" cols="90"><font color="#ffffff">Escriba Aqui</font></textarea>

                                <!--textarea class="textarea" name="var_come_texto" id="agregarComentario">Aqui</textarea> <br-->

                                <script language="JavaScript" type="text/javascript">
                                    makeWhizzyWig("agregarComentario", "bold italic color bullet table fontsize ");
                                </script>
                                <input type="submit" name="submit" value="Enviar comentario"/>
                            </form>

                            <!--script type="text/javascript">
                                var googie1 = new GoogieSpell("googiespell/", "https://www.google.com/tbproxy/spell?lang=");
                                googie1.decorateTextarea("agregarComentario");
                            </script-->

                        </div>
                    </div>
                </div>
            </div>

            <jsp:include page="footer.jsp" />
        </div>
    </body>
</html>
